/** 病害相关的数据库初始化 */
import {
	TAB_REPAIR
} from "../config";

/** 初始化现状表 */
export const createDiseaseRepairTable = db => {
	const sql = `
		create table if not exists '${TAB_REPAIR}'(
			 _id  varchar(255),
			 id   int primary key,
			 code  varchar(255),
			 diseaseStandardLibraryId  varchar(255),
			 estimatedWorkload  varchar(255),
			 leaf  int,
			 makt  varchar(255),
			 measureUnit  varchar(255),
			 recordCreateDate  int,
			 recordUpdateDate  int,
			 treeId  varchar(255),
			 treeLevel  int,
			 workContent  varchar(255),
			 workItem  varchar(255)
		);
	`;
	return db.execute(sql);
}
